<!DOCTYPE html>
<html lang="en">

<head>

  <%- include('head',{title:'写文章'})%>
</head>

<body>

  <%- include('bar',{username:data.username})%>

  <div class="article">
    <form method="post" action="/articles/write">
      <input type="hidden" name="id" value="<%=data.doc._id%>">
      <input type="hidden" name="page" value="文章页数">
      <input type="text" name="title" placeholder="请输入文章标题" value="<%=data.doc.title%>">
      <textarea name="content" class="xheditor"><%=data.doc.content%></textarea>
      <%if(data.doc._id){%>
        <input type="submit" value="修改">
      <%}else{%>
         <input type="submit" value="发布">
      <%}%>
      
     
    </form>
  </div>

  <script type="text/javascript" src="/xheditor/jquery/jquery-1.4.4.min.js"></script>
  <script type="text/javascript" src="/xheditor/xheditor-1.2.2.min.js"></script>
  <script type="text/javascript" src="/xheditor/xheditor_lang/zh-cn.js"></script>
  <script>
  $('.xheditor').xheditor({
    tool:'full',
    skin:'default',
    upImgUrl:'/articles/upload',
    html5Upload:false,
    upMultiple:1
  })
  
  </script>
</body>

</html>
